/**  
* @Title: WechatUserInfoServiceImpl.java
* @Package com.hjb.service.impl.Wechat
* @author <a href="mailto:125671254@qq.com">Pan Xinwen</a>panxinwen
* @date 2018年1月10日 下午11:53:07
* @version V1.0  
*/ 
package com.hjb.service.impl.Wechat;

import org.springframework.batch.item.file.separator.RecordSeparatorPolicy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hjb.service.Wechat.WechatUserInfoService;
import com.hjb.service.domain.siteuser.SiteUser;
import com.hjb.service.domain.siteuser.SiteUserExample;
import com.hjb.service.mapper.SiteUserMapper;

/**
* @ClassName: WechatUserInfoServiceImpl
* @Description: TODO(租户信息管理)
* @author <a href="mailto:125671254@qq.com">Pan Xinwen</a>panxinwen
* @date 2018年1月10日 下午11:53:07
*
*/
@Service
public class WechatUserInfoServiceImpl implements WechatUserInfoService {

	@Autowired
	private SiteUserMapper siteUserMapper;
	
	@Override
	public SiteUser getUser(Integer userId) {
		// TODO Auto-generated method stub
		return siteUserMapper.selectByPrimaryKey(userId);
	}

	@Override
	public int supplementUserMsg(SiteUser siteUser) {
		// TODO Auto-generated method stub
		return siteUserMapper.updateByPrimaryKeySelective(siteUser);
	}

	@Override
	public SiteUser getUserInfoByOpendId(String openid) {
		
		SiteUser record = new SiteUser();
		
		record.setOpenid(openid);
		
		return siteUserMapper.selectOne(record);
	}

}
